

/**
 * 手机卡类
 */
public class PhoneCard {
//    特征：卡类型、卡号、用户名、密码、账户余额、通话时长(分钟)、上网流量 行为：显示（卡号 + 用户名 + 当前余额）
    private PhoneCardType cardType; //卡类型
    private String phoneNum;//卡号
    private String username;//用户名
    private String password;//密码
    private double accountBalance;//账户余额
    private int callTime;//通话时长
    private int internetTraffic;//上网流量


    public void show() {
        System.out.println("您的手机卡号:" + phoneNum + ", 用户名:" + username + ", 当前余额:" + accountBalance + "元");
    }

    public PhoneCard() {
    }

    public PhoneCard(
            PhoneCardType cardType,
            String phoneNum,
            String username,
            String password,
            double accountBalance,
            int callTime,
            int internetTraffic
    ) {
        setCardType(cardType);
        setPhoneNum(phoneNum);
        setUsername(username);
        setPassword(password);
        setAccountBalance(accountBalance);
        setCallTime(callTime);
        setInternetTraffic(internetTraffic);
    }

    public PhoneCardType getCardType() {
        return cardType;
    }

    public void setCardType(PhoneCardType cardType) {
        this.cardType = cardType;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getAccountBalance() {
        return accountBalance;
    }

    public void setAccountBalance(double accountBalance) {
        this.accountBalance = accountBalance;
    }

    public int getCallTime() {
        return callTime;
    }

    public void setCallTime(int callTime) {
        this.callTime = callTime;
    }

    public int getInternetTraffic() {
        return internetTraffic;
    }

    public void setInternetTraffic(int internetTraffic) {
        this.internetTraffic = internetTraffic;
    }
}
